[gd_scene load_steps=61 format=3 uid="uid://wjau22rv2yfi"]

[ext_resource type="Script" path="res://src/player.gd" id="1_r1i7a"]
[ext_resource type="Texture2D" uid="uid://bf820r0golprb" path="res://assets/player/idle/wizard_idle_0001.png" id="2_0itaa"]
[ext_resource type="Texture2D" uid="uid://bp4ll08ufmpss" path="res://assets/player/bubble/bubble(outline) _0001.png" id="2_icib8"]
[ext_resource type="Texture2D" uid="uid://b4vf2yvc6q234" path="res://assets/player/fall/wizard_fall_0001.png" id="2_otldb"]
[ext_resource type="Texture2D" uid="uid://bp4ir28qlyvb0" path="res://assets/player/bubble/charge_0001.png" id="2_ryb0v"]
[ext_resource type="Texture2D" uid="uid://d0753p5cpfk8j" path="res://assets/player/fall/wizard_fall_0002.png" id="3_annbp"]
[ext_resource type="Texture2D" uid="uid://beh7cm8gv6ud" path="res://assets/player/bubble/bubble(outline) _0002.png" id="3_nagnk"]
[ext_resource type="Texture2D" uid="uid://b266h80q5dn6g" path="res://assets/player/bubble/charge_0002.png" id="3_p1gyo"]
[ext_resource type="Texture2D" uid="uid://chnld4pvpimba" path="res://assets/player/idle/wizard_idle_0002.png" id="3_pgyyv"]
[ext_resource type="Texture2D" uid="uid://c6cd7n0xwhi8r" path="res://assets/player/idle/wizard_idle_0003.png" id="4_6xner"]
[ext_resource type="Texture2D" uid="uid://dmuikfr7ag6nv" path="res://assets/player/fall/wizard_fall_0003.png" id="4_jfjhv"]
[ext_resource type="Texture2D" uid="uid://b6cts8ibo7dyi" path="res://assets/player/bubble/bubble(outline) _0003.png" id="4_nbd3g"]
[ext_resource type="Texture2D" uid="uid://djfa3t77cv2gt" path="res://assets/player/bubble/charge_0003.png" id="4_sw3mv"]
[ext_resource type="Texture2D" uid="uid://ba6lx0acnv701" path="res://assets/player/bubble/charge_0004.png" id="5_54xiu"]
[ext_resource type="Texture2D" uid="uid://lgkukth6qsqd" path="res://assets/player/idle/wizard_idle_0004.png" id="5_e2ua5"]
[ext_resource type="Texture2D" uid="uid://cjnawa8ae78g1" path="res://assets/player/bubble/bubble(bottom) _0001.png" id="5_jea7p"]
[ext_resource type="Texture2D" uid="uid://dsol1uoitufmm" path="res://assets/player/bubble/bubble_pop_0001.png" id="5_wrnxe"]
[ext_resource type="Texture2D" uid="uid://epnk34ihfp2" path="res://assets/player/bubble/bubble_pop_0002.png" id="6_deehl"]
[ext_resource type="Texture2D" uid="uid://2ambkpwfda0f" path="res://assets/player/bubble/charge_0005.png" id="6_jxkhv"]
[ext_resource type="Texture2D" uid="uid://dt5dfbgi26exc" path="res://assets/player/bubble/bubble(bottom) _0002.png" id="6_ugvut"]
[ext_resource type="Texture2D" uid="uid://3bkekl3uwot6" path="res://assets/player/idle/wizard_idle_0005.png" id="6_wuf03"]
[ext_resource type="Texture2D" uid="uid://dksewdbdqhkoe" path="res://assets/player/bubble/bubble_pop_0003.png" id="7_2n0u0"]
[ext_resource type="Texture2D" uid="uid://c8binva2k2n8q" path="res://assets/player/bubble/charge_0006.png" id="7_d51t1"]
[ext_resource type="Texture2D" uid="uid://b6b35d7laxka3" path="res://assets/player/bubble/bubble(bottom) _0003.png" id="7_vd0yi"]
[ext_resource type="Texture2D" uid="uid://t6dxnf1yshh7" path="res://assets/player/walking/wizard_walking_0001.png" id="7_ymq4f"]
[ext_resource type="Shader" path="res://src/Shaders/Overlay.gdshader" id="8_7ui4k"]
[ext_resource type="Texture2D" uid="uid://c0ft3l3ihp00u" path="res://assets/player/walking/wizard_walking_0002.png" id="8_flxob"]
[ext_resource type="Texture2D" uid="uid://txpiy51mmu3v" path="res://assets/player/bubble/bubble_pop_0004.png" id="8_k8d2a"]
[ext_resource type="Texture2D" uid="uid://lf1x1x1decxo" path="res://assets/player/bubble/charge_0007.png" id="8_tmj1i"]
[ext_resource type="Texture2D" uid="uid://bvtsxfpywma1s" path="res://assets/player/walking/wizard_walking_0003.png" id="9_1v0l3"]
[ext_resource type="Texture2D" uid="uid://cfgk3mcdof48y" path="res://assets/player/bubble/bubble_pop_0005.png" id="9_hs4hm"]
[ext_resource type="Texture2D" uid="uid://jutwyqhxwo5q" path="res://assets/player/bubble/charge_0008.png" id="9_u5bcl"]
[ext_resource type="Texture2D" uid="uid://bvsq6d8pmo3f8" path="res://assets/player/walking/wizard_walking_0004.png" id="10_doumy"]
[ext_resource type="Texture2D" uid="uid://cmhh01ae40co1" path="res://assets/player/jumphighest/wizard_jumphighest_0001.png" id="10_podvu"]
[ext_resource type="Texture2D" uid="uid://bhvggxeh5wiof" path="res://assets/player/jumphighest/wizard_jumphighest_0002.png" id="11_6g7bq"]
[ext_resource type="Texture2D" uid="uid://b5ty0bycf5f3o" path="res://assets/player/jumpup/wizard_jumpup_0001.png" id="12_wvhao"]
[ext_resource type="Texture2D" uid="uid://bj7mr3lb0cxqa" path="res://assets/player/jumpup/wizard_jumpup_0002.png" id="13_yecvr"]
[ext_resource type="Texture2D" uid="uid://ccpi16pfijkoe" path="res://assets/player/jumpup/wizard_jumpup_0003.png" id="14_qdjen"]
[ext_resource type="Texture2D" uid="uid://bu0fn8tajq385" path="res://assets/player/casting/wizard_casting_0001.png" id="22_uxexl"]
[ext_resource type="Texture2D" uid="uid://dva26ea4i6mj" path="res://assets/player/casting/wizard_casting_0002.png" id="23_a6u62"]
[ext_resource type="Texture2D" uid="uid://byq4ih8at8e2i" path="res://assets/player/casting/wizard_casting_0003.png" id="24_1giuh"]
[ext_resource type="Texture2D" uid="uid://dnfiwkl10kmk8" path="res://assets/player/casting/wizard_casting_0004.png" id="25_o3fy2"]
[ext_resource type="Texture2D" uid="uid://cbo2qwt6ciri3" path="res://assets/player/casting/wizard_casting_0005.png" id="26_oqjww"]
[ext_resource type="Texture2D" uid="uid://dnytglhftiqm6" path="res://assets/player/casting/wizard_casting_0006.png" id="27_b7v5f"]
[ext_resource type="Texture2D" uid="uid://duto14q5y6pmd" path="res://assets/player/casting/wizard_casting_0007.png" id="28_jchja"]
[ext_resource type="Texture2D" uid="uid://qtkohuqdc721" path="res://assets/player/casting/wizard_casting_0008.png" id="29_yabs3"]
[ext_resource type="AudioStream" uid="uid://cr7khefjb4vc8" path="res://assets/audio/sounds/jump.wav" id="47_fel1h"]
[ext_resource type="AudioStream" uid="uid://ddvupf1tl4wk5" path="res://assets/audio/sounds/bubble_pop.wav" id="47_n27jn"]
[ext_resource type="AudioStream" uid="uid://dnrs3ucf1cw7l" path="res://assets/audio/sounds/death_spikes.wav" id="48_usckj"]
[ext_resource type="AudioStream" uid="uid://vk1gpgix48ms" path="res://assets/audio/sounds/landing.wav" id="49_bx0eo"]
[ext_resource type="AudioStream" uid="uid://bhovnoaedelf0" path="res://assets/audio/sounds/bubble_cast.ogg" id="49_p85jp"]
[ext_resource type="AudioStream" uid="uid://c1sa37loirj61" path="res://assets/audio/sounds/on_the_bubble.ogg" id="49_vdb38"]

[sub_resource type="SpriteFrames" id="SpriteFrames_u717o"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_ryb0v")
}, {
"duration": 1.0,
"texture": ExtResource("3_p1gyo")
}, {
"duration": 1.0,
"texture": ExtResource("4_sw3mv")
}, {
"duration": 1.0,
"texture": ExtResource("5_54xiu")
}, {
"duration": 1.0,
"texture": ExtResource("6_jxkhv")
}, {
"duration": 1.0,
"texture": ExtResource("7_d51t1")
}, {
"duration": 1.0,
"texture": ExtResource("8_tmj1i")
}, {
"duration": 1.0,
"texture": ExtResource("9_u5bcl")
}],
"loop": false,
"name": &"charge",
"speed": 11.67
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_nagnk")
}, {
"duration": 1.0,
"texture": ExtResource("4_nbd3g")
}],
"loop": true,
"name": &"critical",
"speed": 6.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_icib8")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("5_wrnxe")
}, {
"duration": 1.0,
"texture": ExtResource("6_deehl")
}, {
"duration": 1.0,
"texture": ExtResource("7_2n0u0")
}, {
"duration": 1.0,
"texture": ExtResource("8_k8d2a")
}, {
"duration": 1.0,
"texture": ExtResource("9_hs4hm")
}],
"loop": false,
"name": &"pop",
"speed": 6.0
}]

[sub_resource type="SpriteFrames" id="SpriteFrames_wea1p"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("6_ugvut")
}, {
"duration": 1.0,
"texture": ExtResource("7_vd0yi")
}],
"loop": true,
"name": &"critical",
"speed": 6.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("5_jea7p")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_7qlrm"]
shader = ExtResource("8_7ui4k")

[sub_resource type="SpriteFrames" id="SpriteFrames_3hjps"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("22_uxexl")
}, {
"duration": 1.0,
"texture": ExtResource("23_a6u62")
}, {
"duration": 1.0,
"texture": ExtResource("24_1giuh")
}, {
"duration": 1.0,
"texture": ExtResource("25_o3fy2")
}, {
"duration": 1.0,
"texture": ExtResource("26_oqjww")
}, {
"duration": 1.0,
"texture": ExtResource("27_b7v5f")
}, {
"duration": 1.0,
"texture": ExtResource("28_jchja")
}, {
"duration": 1.0,
"texture": ExtResource("29_yabs3")
}],
"loop": true,
"name": &"charge",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_otldb")
}, {
"duration": 1.0,
"texture": ExtResource("3_annbp")
}, {
"duration": 1.0,
"texture": ExtResource("4_jfjhv")
}],
"loop": false,
"name": &"fall",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_0itaa")
}, {
"duration": 1.0,
"texture": ExtResource("3_pgyyv")
}, {
"duration": 1.0,
"texture": ExtResource("4_6xner")
}, {
"duration": 1.0,
"texture": ExtResource("5_e2ua5")
}, {
"duration": 1.0,
"texture": ExtResource("6_wuf03")
}],
"loop": true,
"name": &"idle",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("10_podvu")
}, {
"duration": 1.0,
"texture": ExtResource("11_6g7bq")
}],
"loop": false,
"name": &"jump_highest",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("12_wvhao")
}, {
"duration": 1.0,
"texture": ExtResource("13_yecvr")
}, {
"duration": 1.0,
"texture": ExtResource("14_qdjen")
}],
"loop": false,
"name": &"jump_up",
"speed": 12.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_ymq4f")
}, {
"duration": 1.0,
"texture": ExtResource("8_flxob")
}, {
"duration": 1.0,
"texture": ExtResource("9_1v0l3")
}, {
"duration": 1.0,
"texture": ExtResource("10_doumy")
}],
"loop": true,
"name": &"walk",
"speed": 12.0
}]

[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_iptom"]
radius = 8.0
height = 20.0

[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_dftk0"]
radius = 5.0
height = 20.0

[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_qpkk0"]
radius = 4.0
height = 18.0

[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_7wlu2"]
random_pitch = 1.3
streams_count = 1
stream_0/stream = ExtResource("47_fel1h")

[node name="Player" type="CharacterBody2D"]
collision_mask = 7
script = ExtResource("1_r1i7a")

[node name="BubbleSprites" type="Node2D" parent="."]

[node name="BubbleSpriteLayer3" type="AnimatedSprite2D" parent="BubbleSprites"]
visible = false
position = Vector2(1, 4)
sprite_frames = SubResource("SpriteFrames_u717o")
animation = &"charge"

[node name="Layer2" type="AnimatedSprite2D" parent="BubbleSprites"]
visible = false
modulate = Color(1, 1, 1, 0.498039)
position = Vector2(1, 4)
sprite_frames = SubResource("SpriteFrames_wea1p")
animation = &"critical"

[node name="Layer1" type="AnimatedSprite2D" parent="BubbleSprites"]
visible = false
material = SubResource("ShaderMaterial_7qlrm")
position = Vector2(1, 4)
sprite_frames = SubResource("SpriteFrames_wea1p")
animation = &"idle"

[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(2, -3)
sprite_frames = SubResource("SpriteFrames_3hjps")
animation = &"jump_up"

[node name="BubbleArea2D" type="Area2D" parent="."]
collision_mask = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="BubbleArea2D"]
position = Vector2(2, 4)
shape = SubResource("CapsuleShape2D_iptom")

[node name="SpikeArea2D" type="Area2D" parent="."]
collision_mask = 4

[node name="CollisionShape2D" type="CollisionShape2D" parent="SpikeArea2D"]
position = Vector2(2, 4)
shape = SubResource("CapsuleShape2D_dftk0")

[node name="PowerupArea2D" type="Area2D" parent="."]
collision_mask = 8

[node name="CollisionShape2D" type="CollisionShape2D" parent="PowerupArea2D"]
position = Vector2(2, 4)
shape = SubResource("CapsuleShape2D_dftk0")

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(2, 4)
shape = SubResource("CapsuleShape2D_qpkk0")

[node name="BubbleCastRayCast2D" type="RayCast2D" parent="."]
target_position = Vector2(0, -32)
collision_mask = 6

[node name="BubbleTimer" type="Timer" parent="."]
one_shot = true

[node name="BubbleGravityTimer" type="Timer" parent="."]
one_shot = true

[node name="BubbleAboutToBurstTimer" type="Timer" parent="."]
one_shot = true

[node name="ChargeBubbleTimer" type="Timer" parent="."]
one_shot = true

[node name="CoyoteTimer" type="Timer" parent="."]
one_shot = true

[node name="JumpBufferTimer" type="Timer" parent="."]
one_shot = true

[node name="SpikeTimer" type="Timer" parent="."]
wait_time = 0.1
autostart = true

[node name="Audios" type="Node" parent="."]

[node name="JumpAudio" type="AudioStreamPlayer" parent="Audios"]
stream = SubResource("AudioStreamRandomizer_7wlu2")
bus = &"Sounds"

[node name="BubbleCast" type="AudioStreamPlayer" parent="Audios"]
stream = ExtResource("49_p85jp")
bus = &"Sounds"

[node name="BubblePop" type="AudioStreamPlayer" parent="Audios"]
stream = ExtResource("47_n27jn")
bus = &"Sounds"

[node name="DeathSpikes" type="AudioStreamPlayer" parent="Audios"]
stream = ExtResource("48_usckj")
bus = &"Sounds"

[node name="FallDamage" type="AudioStreamPlayer" parent="Audios"]
stream = ExtResource("49_bx0eo")
bus = &"Sounds"

[node name="OnTheBubble" type="AudioStreamPlayer" parent="Audios"]
stream = ExtResource("49_vdb38")
bus = &"Sounds"

[connection signal="animation_finished" from="BubbleSprites/BubbleSpriteLayer3" to="." method="_on_bubble_sprite_layer_3_animation_finished"]
[connection signal="body_entered" from="BubbleArea2D" to="." method="_on_bubble_area_2d_body_entered"]
[connection signal="body_entered" from="SpikeArea2D" to="." method="_on_spike_area_2d_body_entered"]
[connection signal="body_exited" from="SpikeArea2D" to="." method="_on_spike_area_2d_body_exited"]
[connection signal="area_shape_entered" from="PowerupArea2D" to="." method="_on_powerup_area_2d_area_shape_entered"]
[connection signal="timeout" from="BubbleTimer" to="." method="_on_bubble_timer_timeout"]
[connection signal="timeout" from="BubbleGravityTimer" to="." method="_on_bubble_gravity_timer_timeout"]
[connection signal="timeout" from="BubbleAboutToBurstTimer" to="." method="_on_bubble_about_to_burst_timer_timeout"]
[connection signal="timeout" from="ChargeBubbleTimer" to="." method="_on_charge_bubble_timer_timeout"]
[connection signal="timeout" from="CoyoteTimer" to="." method="_on_coyote_timer_timeout"]
[connection signal="timeout" from="JumpBufferTimer" to="." method="_on_jump_buffer_timer_timeout"]
[connection signal="timeout" from="SpikeTimer" to="." method="_on_spike_timer_timeout"]
